package com.only4play.starfish.common;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.time.Instant;

@Getter
@Setter
@NoArgsConstructor
public abstract class AbstractResponse {

    protected Integer errorCode;
    protected String errorMessage;
    protected Long timestamp;

    public AbstractResponse(Integer errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMessage = errorMsg;
        this.timestamp = Instant.now().toEpochMilli();
    }
}